﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>根据浏览器不同设置CSS</title>
    <script language=javascript>
        if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4))
        {
            document.write('<link rel=stylesheet type="text/css" href="ie.css">') //IE浏览器下的样式
        }
        else {
            document.write('<link rel=stylesheet type="text/css" href="ns.css">')//Netscape下的样式
        }
    </script>
</head>
<body>

</body>
</html>